<!DOCTYPE html>
<html>
<head>
<title>流程模型</title>
#parse("sys/header.html")
</head>
<body>
<div  id="rrapp" v-cloak class="container-fluid">

	<div class="row">
			<div class="col-xs-6">
				<div class="row">
					<div class="col-xs-12" >
					<iframe :src="'../diagram-viewer/index.html?processDefinitionId='+bpmModel.processDefinitionId" width="100%" style="background-color: #0f0f0f"></iframe>  
					</div>
				</div>
				<div class="row">
					<div class="col-xs-6" >
						<ul id="nodeTree" class="ztree"></ul>
					</div>
					<div class="col-xs-6" >
						<button type="button" class="btn btn-xs btn-primary" @click="add">
						<i class="fa fa-check align-top bigger-125">
						</i>
						新增
						</button>
					<ul id="ruleTree" class="ztree"></ul>
					</div>
				</div>
			</div>
			<div class="col-xs-6">
				<div v-show="!showList" class="panel panel-default">
					<div class="panel-heading">{{title}}</div>
					<form class="form-horizontal">
						<div class="form-group">
						   	<div class="col-sm-2 control-label">父键</div>
						   	<div class="col-sm-10">
						      <input type="text" class="form-control" v-model="bpmNodeRule.pid" placeholder="父键"/>
						    </div>
						</div>
						<div class="form-group">
						   	<div class="col-sm-2 control-label">模板id</div>
						   	<div class="col-sm-10">
						      <input type="text" class="form-control" v-model="bpmNodeRule.bpmModleId" placeholder="模板id"/>
						    </div>
						</div>
												<div class="form-group">
						   	<div class="col-sm-2 control-label">节点id</div>
						   	<div class="col-sm-10">
						      <input type="text" class="form-control" v-model="bpmNodeRule.bpmModleNodeId" placeholder="节点id"/>
						    </div>
						</div>
												<div class="form-group hidden">
						   	<div class="col-sm-2 control-label">部署规则id</div>
						   	<div class="col-sm-10">
						      <input type="text" class="form-control" v-model="bpmNodeRule.bpmDeploymentId" placeholder="部署规则id"/>
						    </div>
						</div>
												<div class="form-group hidden">
						   	<div class="col-sm-2 control-label">部署成功流程定义Id</div>
						   	<div class="col-sm-10">
						      <input type="text" class="form-control" v-model="bpmNodeRule.bpmProcessDefinitionId" placeholder="部署成功流程定义Id"/>
						    </div>
						</div>
												<div class="form-group">
						   	<div class="col-sm-2 control-label">规则名称</div>
						   	<div class="col-sm-10">
						      <input type="text" class="form-control" v-model="bpmNodeRule.ruleName" placeholder="规则名称"/>
						    </div>
						</div>
						<div class="form-group">
							<label class="col-sm-2 control-label">
								规则类型
							</label>
							<div class="col-sm-10">
								<select class="form-control" v-model="bpmNodeRule.ruleType">
									<option value="b">
										按钮
									</option>
									<option value="e">
										环境变量
									</option>
									<option value="p">
										选择参与者
									</option>
									<option value="s">
										执行脚本
									</option>
								</select>
							</div>
						</div>
						
						<div class="form-group">
						   	<div class="col-sm-2 control-label">排序</div>
						   	<div class="col-sm-10">
						      <input type="text" class="form-control" v-model="bpmNodeRule.ruleOrder" placeholder="排序"/>
						    </div>
						</div>
						<div class="form-group" v-if=" bpmNodeRule.ruleType == 'e' ">
						   	<div class="col-sm-2 control-label">流程环境变量名</div>
						   	<div class="col-sm-10">
						      <input type="text" class="form-control" v-model="bpmNodeRule.bpmEnvName" placeholder="流程环境变量名"/>
						    </div>
						</div>
												<div class="form-group" v-if=" bpmNodeRule.ruleType == 'e' ">
						   	<div class="col-sm-2 control-label">流程环境变量值</div>
						   	<div class="col-sm-10">
						      <input type="text" class="form-control" v-model="bpmNodeRule.bpmEnvValue" placeholder="流程环境变量值"/>
						    </div>
						</div>
												<div class="form-group" v-if=" bpmNodeRule.ruleType == 'p' ">
						   	<div class="col-sm-2 control-label">流程参与人设置XX[R]:设置确实，xx[O]:设置机构、xx[P]：设置人员</div>
						   	<div class="col-sm-10">
						      <input type="text" class="form-control" v-model="bpmNodeRule.bpmPartyName" placeholder="流程参与人设置XX[R]:设置确实，xx[O]:设置机构、xx[P]：设置人员"/>
						    </div>
						</div>
												<div class="form-group" v-if=" bpmNodeRule.ruleType == 'p' ">
						   	<div class="col-sm-2 control-label">流程参与人设置的值，逗号分割</div>
						   	<div class="col-sm-10">
						      <input type="text" class="form-control" v-model="bpmNodeRule.bpmPartyValue" placeholder="流程参与人设置的值，逗号分割"/>
						    </div>
						</div>
										<div class="form-group">
							<div class="col-sm-2 control-label"></div> 
							<input type="button" class="btn btn-primary" @click="saveOrUpdate" value="确定"/>
							&nbsp;&nbsp;<input type="button" class="btn btn-warning" @click="reload" value="返回"/>
						</div>
					</form>
				</div>
			</div>
		</div>
</div>
<script src="${rc.contextPath}/js/bpm/bpmProcessDefinitionsNode.js?_${date.systemTime}"></script>
</body>

</html>